import { post, get } from '../http'
//公共导出接口
export const commonExport = async (paylaod?: any) => {
  return await post('/user/v1/export/commonExport', paylaod)
    .then((res) => res)
    .catch(() => false)
}
//模板列表
export const findTemplateList = async (paylaod?: any) => {
  return await get('/user/v1/template/findTemplateList', paylaod)
    .then((res) => res)
    .catch(() => false)
}
//新增模板
export const createTemplate = async (paylaod?: any) => {
  return await post('/user/v1/template/createTemplate', paylaod)
    .then((res) => res)
    .catch(() => false)
}
//更新模板
export const updateTemplate = async (paylaod?: any) => {
  return await post('/user/v1/template/updateTemplate', paylaod)
    .then((res) => res)
    .catch(() => false)
}
//FBA发货单明细导出（仓储）
export const exportFbaShipmentDetailByStore = async (paylaod?: any) => {
  return await post('/procurement/v1/fba/shipment/exportFbaShipmentDetailByStore', paylaod)
    .then((res) => res)
    .catch(() => false)
}
//FBA发货单导出（仓储）
export const exportFbaShipmentByStore = async (paylaod?: any) => {
  return await post('/procurement/v1/fba/shipment/exportFbaShipmentByStore', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// FBA发货单装箱信息导出（仓储）
export const exportFbaShipmentBoxInfoByStore = async (paylaod?: any) => {
  return await post('/procurement/v1/fba/shipment/exportFbaShipmentBoxInfoByStore', paylaod)
    .then((res) => res)
    .catch(() => false)
}

//FBA发货单明细导出（业务）
export const exportFbaShipmentDetailBySale = async (paylaod?: any) => {
  return await post('/procurement/v1/fba/shipment/exportFbaShipmentDetailBySale', paylaod)
    .then((res) => res)
    .catch(() => false)
}
//FBA发货单导出（业务）
export const exportFbaShipmentBySale = async (paylaod?: any) => {
  return await post('/procurement/v1/fba/shipment/exportFbaShipmentBySale', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// FBA发货单装箱信息导出（业务）
export const exportFbaShipmentBoxInfoBySale = async (paylaod?: any) => {
  return await post('/procurement/v1/fba/shipment/exportFbaShipmentBoxInfoBySale', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// sku导出
export const exportProductSku = async (paylaod?: any) => {
  return await post('/product/sku/exportProductSku', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 结算报告明细导出
export const exportSettlementItem = async (paylaod?: any) => {
  return await post('/finance/v1/amzreport/settlement/report/exportSettlementItem', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 结算报告运营汇总导出
export const exportSettlementSalesmanAgg = async (paylaod?: any) => {
  return await post('/finance/v1/amzreport/settlement/report/exportSettlementSalesmanAgg', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 采购入库单导出
export const exportReceiptOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/receipt/exportReceiptOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 团队任务导出
export const exportTeamTask = async (paylaod?: any) => {
  return await post('/finance/v1/task/export/exportTeamTask', paylaod)
    .then((res) => res)
    .catch(() => false)
}

// 我的任务明细导出
export const exportFinishTaskItems = async (paylaod?: any) => {
  return await post('/finance/v1/task/export/exportFinishTaskItems', paylaod)
    .then((res) => res)
    .catch(() => false)
}
